<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a href="http://jinlong.github.io/2015/12/14/negating-predicate-functions-in-javaScript/">
    JavaScript 否定谓语函数
</a>
<a href="http://web.jobbole.com/84592/">
    javascript函数式编程要掌握的知识点讲解
</a>
<a href="http://web.jobbole.com/84456/">
    闭包
</a>
<p>
    call()
    apply()
    arguments.callee
    1、call和apply 最常见的用途是改变函数体内的this指向
</p>
<script>
    var superman = {
        name: "Superman",
        strength: "Super",
        heroism: true
    };

    /**
     * 函数接收一个谓语函数作为参数，返回一个函数用来对之前谓语的功能取反。
     * @param predicateFunc
     * @returns {Function}
     */
    function negate (predicateFunc)
    {
        return function () {
            return !predicateFunc.apply(this, arguments);
        };
    }
    function isSuperStrong (character) {
        return character.strength === "Super";
    }
    var isNotSuperStrong = negate(isSuperStrong);
    console.log(isSuperStrong(superman));

</script>
</body>
</html>